<?php
// multiply.php, multiply.common.php, multiply.server.php
// demonstrate a very basic xajax implementation
// using xajax version 0.2
// http://xajaxproject.org
include_once  ('./../../module/common/config.inc.php');
include_once ("./xajax_common.php");
$objresponse = new xajaxResponse();
function checkUsername($username,$tipsid){
	global $objresponse;
	if ($username && $tipsid){
		c_create::createClass('user');
		$user = new user();
		if ($user->checkExists($username) > 0){
			$checkresult = "用户名已经存在";	
		}else {
			$checkresult = "恭喜您可以注册这个用户";
		}
	}else{
		$checkresult = "用户名不能为空";
	}
	$objresponse->addassign($tipsid,"innerHTML",$checkresult);//指定ID为result的元素中添加内容$checkresult
	return $objresponse;//返回结果文本
}
function checkLogin($showid){
	session_start();
	global $objresponse;
	if ($_SESSION[userName]){
		$checkresult = "用户已经登录";	
	}else {
		$checkresult = "用户未登录";	
	}
	$objresponse->addassign($showid,"innerHTML",$checkresult);//指定ID为result的元素中添加内容$checkresult
	return $objresponse;//返回结果文本
}
$xajax->processRequests();

?>